/*
 * Tidal - an IDE for Google Wave gadgets.
 * Copyright (C) 2010 Nathan Summers
 * 
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as
 * published by the Free Software Foundation, either version 3 of the
 * License, or (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 * 
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

package com.googlecode.tidal.ide.file.jcache;

import java.io.Serializable;

import com.googlecode.tidal.ide.file.File;

public class SerializableFile implements Serializable, File {
    private static final long serialVersionUID = 1L;
    
    private String mimeType;
    private String filename;
    private String contents;
    
    public SerializableFile(File file) {
	mimeType = file.getMimeType();
	filename = file.getFilename();
	contents = file.getContents();
    }
    
    public SerializableFile(){}
    
    /* (non-Javadoc)
     * @see com.googlecode.tidal.ide.file.File#getMimeType()
     */
    public String getMimeType() {
        return mimeType;
    }
    /* (non-Javadoc)
     * @see com.googlecode.tidal.ide.file.File#setMimeType(java.lang.String)
     */
    public void setMimeType(String mimeType) {
        this.mimeType = mimeType;
    }
    /* (non-Javadoc)
     * @see com.googlecode.tidal.ide.file.File#getFilename()
     */
    public String getFilename() {
        return filename;
    }
    /* (non-Javadoc)
     * @see com.googlecode.tidal.ide.file.File#setFilename(java.lang.String)
     */
    public void setFilename(String filename) {
        this.filename = filename;
    }
    /* (non-Javadoc)
     * @see com.googlecode.tidal.ide.file.File#getContents()
     */
    public String getContents() {
        return contents;
    }
    /* (non-Javadoc)
     * @see com.googlecode.tidal.ide.file.File#setContents(java.lang.String)
     */
    public void setContents(String contents) {
        this.contents = contents;
    }
}